import { createStore } from 'vuex'
import state from './state'
import * as actions from './actions'
import getters from './getters'
import mutations from './mutations'

const debug = process.env.NODE_ENV !== 'produciton'
export default createStore({
  state,
  getters,
  mutations,
  actions,
  plugins: debug ? [] : [],
  strict: debug // 严格模式，禁止在actions中修改state中的数据
})
